<%@include file="/jsp/init.jspf" %>
<layout:top menu="invoice"/>
<h1  class="pagetitle">Invoice search</h1>
<hunk:container>
    <hunk:validator form="searchForm">
        <hunk:form action="search?action=searchInvoice" name="searchForm">
            <table class="hundred">
                <tr>
                    <td><hunk:text name="invoiceNo" label="invoice No"/> </td>
                    <td><hunk:text name="orderNo" label="Order No"/> </td>
                    <td><hunk:text name="vesselNo" label="Vessel No"/> </td>
                </tr>
                <tr>
                    <td><hunk:text name="pod" label="Port of Discharge"/> </td>
                    <td><hunk:text name="pol" label="Port of Loading"/> </td>
                    <td><hunk:text name="destination" label="Destination"/> </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <div class="panel">
                        <hunk:submit label="Search"/>
                        <hunk:button label="Add Invoice" onclick="window.location='${path}/invoice.do?action=newInvoice'" styleClass="button"/>
                        </div>
                    </td>
                </tr>
            </table>
        </hunk:form>
    </hunk:validator>
</hunk:container>

<c:if test="${not empty invoices}">
    <display:table list="${invoices}"  id="invoice" class="display_table">
        <display:column property="invoiceNo" title="Invoice Number"/>
        <display:column property="orderNo" title="Order No"/>
        <display:column property="vesselNo" title="Vessel No"/>
        <display:column property="pod" title="Port Of Discharge"/>
        <display:column property="pol" title="Port of Loading"/>
        <display:column property="destination" title="Destination"/>
        <display:column title="Destination">
            <a href="${path}/invoice.do?action=display&invoice.id=${invoice.id}" class="icon_16 edit"></a>
        </display:column>
    </display:table>
</c:if>
<layout:bottom/>
